#include "BulletCollision/CollisionShapes/btCompoundShape.h"
#ifdef __cplusplus
extern "C" {
#endif
btCompoundShapeData* bullet_NewbtCompoundShapeData(){
	btCompoundShapeData* wrap_out = new btCompoundShapeData();
	return wrap_out;
}

btCompoundShapeChildData** bullet_btCompoundShapeData_GetFieldOfM_childShapePtr(btCompoundShapeData* c_this){
	return (btCompoundShapeChildData**)(&c_this->m_childShapePtr);
}

float bullet_btCompoundShapeData_GetFieldOfM_collisionMargin(btCompoundShapeData* c_this){
	return (float)(c_this->m_collisionMargin);
}

btCollisionShapeData* bullet_btCompoundShapeData_GetFieldOfM_collisionShapeData(btCompoundShapeData* c_this){
	return (btCollisionShapeData*)(&c_this->m_collisionShapeData);
}

int bullet_btCompoundShapeData_GetFieldOfM_numChildShapes(btCompoundShapeData* c_this){
	return (int)(c_this->m_numChildShapes);
}

btCompoundShapeChildData* bullet_NewbtCompoundShapeChildData(){
	btCompoundShapeChildData* wrap_out = new btCompoundShapeChildData();
	return wrap_out;
}

float bullet_btCompoundShapeChildData_GetFieldOfM_childMargin(btCompoundShapeChildData* c_this){
	return (float)(c_this->m_childMargin);
}

btCollisionShapeData** bullet_btCompoundShapeChildData_GetFieldOfM_childShape(btCompoundShapeChildData* c_this){
	return (btCollisionShapeData**)(&c_this->m_childShape);
}

int bullet_btCompoundShapeChildData_GetFieldOfM_childShapeType(btCompoundShapeChildData* c_this){
	return (int)(c_this->m_childShapeType);
}

btTransformFloatData* bullet_btCompoundShapeChildData_GetFieldOfM_transform(btCompoundShapeChildData* c_this){
	return (btTransformFloatData*)(&c_this->m_transform);
}

btCompoundShapeChild* bullet_NewbtCompoundShapeChild(){
	btCompoundShapeChild* wrap_out = new btCompoundShapeChild();
	return wrap_out;
}

double bullet_btCompoundShapeChild_GetFieldOfM_childMargin(btCompoundShapeChild* c_this){
	return (double)(c_this->m_childMargin);
}

int bullet_btCompoundShapeChild_GetFieldOfM_childShapeType(btCompoundShapeChild* c_this){
	return (int)(c_this->m_childShapeType);
}

btTransform* bullet_btCompoundShapeChild_GetFieldOfM_transform(btCompoundShapeChild* c_this){
	return (btTransform*)(&c_this->m_transform);
}

btCompoundShape* bullet_NewbtCompoundShape(bool enableDynamicAabbTree,int initialChildCapacity){
	bool c_arg_enableDynamicAabbTree=enableDynamicAabbTree;
	int const c_arg_initialChildCapacity=initialChildCapacity;
	btCompoundShape* wrap_out = new btCompoundShape(c_arg_enableDynamicAabbTree,c_arg_initialChildCapacity);
	return wrap_out;
}

void bullet_btCompoundShape_addChildShape(btCompoundShape* c_this,btTransform* localTransform,btCollisionShape* shape){
	btTransform const& c_arg_localTransform=(btTransform const&)(*localTransform);
	btCollisionShape * c_arg_shape=(btCollisionShape *)(void*)(shape);
	c_this->addChildShape(c_arg_localTransform,c_arg_shape);
}

void bullet_btCompoundShape_calculatePrincipalAxisTransform(btCompoundShape* c_this,double* masses,btTransform* principal,btVector3* inertia){
	btScalar const * c_arg_masses=(btScalar const *)(void*)(masses);
	btTransform& c_arg_principal=(btTransform&)(*principal);
	btVector3& c_arg_inertia=(btVector3&)(*inertia);
	c_this->calculatePrincipalAxisTransform(c_arg_masses,c_arg_principal,c_arg_inertia);
}

void bullet_btCompoundShape_createAabbTreeFromChildren(btCompoundShape* c_this){
	c_this->createAabbTreeFromChildren();
}

btCompoundShapeChild* bullet_btCompoundShape_getChildList(btCompoundShape* c_this){
	btCompoundShapeChild * c_out = c_this->getChildList();
	btCompoundShapeChild* wrap_out = (btCompoundShapeChild*)(void*)(c_out);
	return wrap_out;
}

btTransform* bullet_btCompoundShape_getChildTransform(btCompoundShape* c_this,int index){
	int c_arg_index=index;
	btTransform& c_out = c_this->getChildTransform(c_arg_index);
	btTransform* wrap_out = (btTransform*)(&c_out);
	return wrap_out;
}

btTransform* bullet_btCompoundShape_getChildTransform1(btCompoundShape* c_this,int index){
	int c_arg_index=index;
	btTransform const& c_out = c_this->getChildTransform(c_arg_index);
	btTransform* wrap_out = (btTransform*)(&c_out);
	return wrap_out;
}

btDbvt* bullet_btCompoundShape_getDynamicAabbTree(btCompoundShape* c_this){
	btDbvt const * c_out = c_this->getDynamicAabbTree();
	btDbvt* wrap_out = (btDbvt*)(void*)(c_out);
	return wrap_out;
}

btDbvt* bullet_btCompoundShape_getDynamicAabbTree1(btCompoundShape* c_this){
	btDbvt * c_out = c_this->getDynamicAabbTree();
	btDbvt* wrap_out = (btDbvt*)(void*)(c_out);
	return wrap_out;
}

int bullet_btCompoundShape_getNumChildShapes(btCompoundShape* c_this){
	int c_out = c_this->getNumChildShapes();
	int wrap_out = (c_out);
	return wrap_out;
}

int bullet_btCompoundShape_getUpdateRevision(btCompoundShape* c_this){
	int c_out = c_this->getUpdateRevision();
	int wrap_out = (c_out);
	return wrap_out;
}

void bullet_btCompoundShape_removeChildShapeByIndex(btCompoundShape* c_this,int childShapeindex){
	int c_arg_childShapeindex=childShapeindex;
	c_this->removeChildShapeByIndex(c_arg_childShapeindex);
}

void bullet_btCompoundShape_updateChildTransform(btCompoundShape* c_this,int childIndex,btTransform* newChildTransform,bool shouldRecalculateLocalAabb){
	int c_arg_childIndex=childIndex;
	btTransform const& c_arg_newChildTransform=(btTransform const&)(*newChildTransform);
	bool c_arg_shouldRecalculateLocalAabb=shouldRecalculateLocalAabb;
	c_this->updateChildTransform(c_arg_childIndex,c_arg_newChildTransform,c_arg_shouldRecalculateLocalAabb);
}

#ifdef __cplusplus
}
#endif
